/*
Copyright 2022 The Numaproj Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Code generated by Openapi Generator. DO NOT EDIT.

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct GeneratorSource {
    #[serde(rename = "duration", skip_serializing_if = "Option::is_none")]
    pub duration: Option<kube::core::Duration>,
    #[serde(rename = "jitter", skip_serializing_if = "Option::is_none")]
    pub jitter: Option<kube::core::Duration>,
    /// KeyCount is the number of unique keys in the payload
    #[serde(rename = "keyCount", skip_serializing_if = "Option::is_none")]
    pub key_count: Option<i32>,
    /// Size of each generated message
    #[serde(rename = "msgSize", skip_serializing_if = "Option::is_none")]
    pub msg_size: Option<i32>,
    #[serde(rename = "rpu", skip_serializing_if = "Option::is_none")]
    pub rpu: Option<i64>,
    /// Value is an optional uint64 value to be written in to the payload
    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
    pub value: Option<i64>,
    /// ValueBlob is an optional string which is the base64 encoding of direct payload to send. This is useful for attaching a GeneratorSource to a true pipeline to test load behavior with true messages without requiring additional work to generate messages through the external source if present, the Value and MsgSize fields will be ignored.
    #[serde(rename = "valueBlob", skip_serializing_if = "Option::is_none")]
    pub value_blob: Option<String>,
}

impl GeneratorSource {
    pub fn new() -> GeneratorSource {
        GeneratorSource {
            duration: None,
            jitter: None,
            key_count: None,
            msg_size: None,
            rpu: None,
            value: None,
            value_blob: None,
        }
    }
}
